#ifndef __USB_H__
#define __USB_H__

void usb_init(void);
void usb_disconnect(void);
void usb_poll(void);
void usb_send_ready(void);

/* called when usb is configured or goes offline */
void usb_status(unsigned online);

/* process up to 64 bytes of data. return non-zero
   there is data to send in response*/
unsigned usb_bulk_recv(void *data, unsigned len);


#ifdef WITH_FASTER_USB
unsigned usb_bulk_send(unsigned char **ptr);
#else
/* fill the send buffer with up to 64 bytes of data
   and return the number of bytes to send. 0 == stop
   sending data */
unsigned usb_bulk_send(void *data);
#endif

#endif
